// AVDecoder.h: interface for the AVDecoder class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_AVDECODER_H__826E237C_1FCC_487F_9E51_B0884D719481__INCLUDED_)
#define AFX_AVDECODER_H__826E237C_1FCC_487F_9E51_B0884D719481__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class AVDecoder  
{
public:
	AVDecoder();
	virtual ~AVDecoder();
	void	Release();
public:
	INT32	SetThreadCount(INT32 thread_count);
	INT32	SetContext(INT32 media_type, AVCodecContext* ctx);
	INT32	CreateContext(INT32 media_type, INT32 codec_id, INT32 thread_count);
	INT32	SetFrame(INT32 media_type, AVPacket* avpkt, uint8_t* buffer, INT32 cbuffer, uint64_t* ppts, uint64_t* pdts);
protected:
	INT32				m_thread_count;
	AVCodecContext*		m_vctx;
	AVCodecContext*		m_actx;
	AVCodecContext*		m_sctx;
};

#endif // !defined(AFX_AVDECODER_H__826E237C_1FCC_487F_9E51_B0884D719481__INCLUDED_)
